import httpInstance from "@/utils/http";
// 获取二级分类列表
export function getCategoryApi(id) {
    return httpInstance({
        url:'/category',
        params:{
            id
        }
    })
}
// 获取三级分类列表
export function getCategoryFilterApi(id) {
  return httpInstance({
    url:`/category/sub/filter`,
    params: {
      id
    }
  })
}
// 获取商品列表
/**
 * @description: 获取导航数据
 * @data {
     categoryId: 1005000 ,
     page: 1,
     pageSize: 20,
     sortField: 'publishTime' | 'orderNum' | 'evaluateNum'
   }
 * @return {*}
 */
export const getSubCategoryAPI = (data) => {
  return httpInstance({
    url:'/category/goods/temporary',
    method:'POST',
    data
  })
}
